(function(){"use strict";BX.namespace("BX.Landing.UI.Tool");var t=BX.Landing.Utils.isEmpty;var n=BX.Landing.Utils.isNumber;var i=BX.Landing.Utils.bind;var e=BX.Landing.Utils.unbind;var s=BX.Landing.Utils.proxy;var o=BX.Landing.Utils.create;BX.Landing.UI.Tool.Suggest=function(){this.lastElement=null;this.popup=null;this.popupTimeout=0;i(document,"mousedown",s(this.hide,this))};BX.Landing.UI.Tool.Suggest.instance=null;BX.Landing.UI.Tool.Suggest.getInstance=function(){return BX.Landing.UI.Tool.Suggest.instance||(BX.Landing.UI.Tool.Suggest.instance=new BX.Landing.UI.Tool.Suggest)};BX.Landing.UI.Tool.Suggest.prototype={createContent:function(n){var i=[];if(!t(n.name)){i.push(o("div",{props:{className:"landing-ui-field-link-media-help-popup-content-title"},html:n.name||n.title}))}if(!t(n.description)){i.push(o("div",{props:{className:"landing-ui-field-link-media-help-popup-content-content"},html:n.description}))}return o("div",{props:{className:"landing-ui-field-link-media-help-popup-content"},children:i})},show:function(t,e){if(this.popup===null){this.popup=new BX.Main.Popup({id:"landing_suggests_popup",autoHide:false,offsetLeft:-20,offsetTop:11,angle:{offset:74}})}if(!n(e.angleOffset)){e.angleOffset=74}this.popup.setBindElement(t);this.popup.setContent(this.createContent(e));this.lastElement=t;this.popupTimeout=o.apply(this);function o(){return setTimeout(function(){i(t,"mouseleave",s(this.hide,this));this.popup.show();this.popup.setAngle({offset:e.angleOffset,position:"top"})}.bind(this),200)}},hide:function(){if(this.popup&&this.popup.isShown()){e(this.lastElement,"mouseleave",s(this.hide,this));clearTimeout(this.popupTimeout);this.popup.close()}}}})();
//# sourceMappingURL=suggests.map.js